//- Copyright (C) 2023 Beijing Huaxia Chunsong Technology Co., Ltd. 
//- <https://www.chatopera.com>, Licensed under the Chunsong Public 
//- License, Version 1.0  (the "License"), https://docs.cskefu.com/licenses/v1.html
//- Unless required by applicable law or agreed to in writing, software
//- distributed under the License is distributed on an "AS IS" BASIS,
//- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//- See the License for the specific language governing permissions and
//- limitations under the License.
//- Copyright (C) 2018-Jun. 2023 Chatopera Inc, <https://www.chatopera.com>
//- Licensed under the Apache License, Version 2.0
//- http://www.apache.org/licenses/LICENSE-2.0
html
    head
    body
        ul.layui-nav.layui-nav-tree(lay-filter='setting')
            if user.roleAuthMap["A06_A01"] || user.admin
                li.layui-nav-item.layui-nav-itemed
                    a.layui-nav-title(href='javascript:;') 客服设置
                    dl.layui-nav-child
                        if user.roleAuthMap["A06_A01_A01"] || user.admin
                            dd(class={'layui-this': subtype == 'sessionconfig'}): a(href='/setting/agent/index.html') 对话设置
                        if user.roleAuthMap["A06_A01_A02"] || user.admin
                            dd(class={'layui-this': subtype == 'blacklist'}): a(href='/setting/blacklist.html') 黑名单
                        //- dd(class={'layui-this': subtype == 'acd'}): a(href='/setting/acd.html') ACD策略
            if user.roleAuthMap["A06_A02"] || user.admin
                li.layui-nav-item.layui-nav-itemed
                    a.layui-nav-title(href='javascript:;') 广告位管理
                    dl.layui-nav-child
                        if advTypeList
                            for advDic in advTypeList
                                dd(class={'layui-this': advDic.id == advType.id}): a(href='/setting/adv.html?adpos=' + advDic.id)= advDic.name
            if user.roleAuthMap["A06_A03"] || user.admin
                li.layui-nav-item.layui-nav-itemed
                    a.layui-nav-title(href='javascript:;') 标签管理
                    dl.layui-nav-child
                        for tagTypeDic in tagTypeList
                            dd(class={'layui-this': tagType.code == tagTypeDic.code})
                                a(href='/setting/tag.html?code=' + tagTypeDic.code)= tagTypeDic.name